use "PATH(zip_RESTS_CBB_PPP_gini_CBP_County_Full_210114_dummies.dta)", clear
encode size, generate(sizeFE)
encode stateabbrev, generate(stateFE)

label var FS_count_loans_P1_per_est "% Food service est. w/ PPP (Phase 1)"
label var FS_count_loans_P1P2_per_est "% Food service est. w/ PPP (Both Phases)"
label var FS_count_PCT_P1 "% of all PPP loans received in Phase 1"
label var FS_count_loans_P1_per_est_COUNTY "% Food service est. w/ PPP (Phase 1)"
label var FS_count_loans_P1P2_per_est_COUN "% Food service est. w/ PPP (Both Phases)"
label var FS_count_PCT_P1_COUNTY "% of all PPP loans received in Phase 1"
label var PCT_male "% Male"
label var PCT_18_years_and_over_ "% Age >= 18"
label var PCT_Asian "% Asian"
label var PCT_Hispanic__of_any_race_ "% Hispanic"
label var PCT_Bachelor_s_degree_or_higher "% w/ Bachelor's or higher"
label var Average_household_size "Avg. household size"
label var PCT_in_poverty "% in poverty"
label var PCT_employed "% Employed"
label var PCT_disabled "% Disabled"
label var PCT_with_health_coverage "% w/ health coverage"
label var PCT_workers_using_public_transpo "% workers using public trans."
label var Perc_dining_out "% of household exp. dining out"
label var Rating "Rest. Yelp rating"
label var log_age "Log rest. age"
label var log_Reviews "Log rest. reviews"
label var log_Total_population "Log ZIP code population"
label var log_Median_age "Log median age"
label var log_Median_household_income "Log median household income"
label var log_Total_number_of_housing_unit "Log # housing units"
label var log_Median_owner_occupied_housin "Log median home value"
label var log_Median_rent__housing_ "Log median rent"
label var affinity_spend_all "TtR Affinity Spending"
label var case_rate "TtR COVID case rate"
label var death_rate "TtR COVID death rate"
label var emp_combined "TtR employment change"
label var gps_retail_and_recreation "TtR mobility - retail & rec."
label var initclaims_rate_regular "TtR UI claim change"
label var merchants_all "TtR merchants open"
label var revenue_all "TtR merchants revenue"
label var pct_rep_16 "% Republican 2016"
label var vote_pct_16 "% Voted 2016"
label var Homeownership_rate "Homeownership rate"
label var Vacancy_rate "Vacancy rate"
label var PCT_with_a_broadband_internet_su "% with broadband"
label var gini "Income inequality - Gini"
label var PCT_Black_or_African_American "% African American"
eststo clear

* Phase 1 Percent of food service establishments receiving loans
eststo: ivreghdfe Closed (FS_count_loans_P1_per_est = CB_Share_zip) PCT_male PCT_18_years_and_over_ PCT_Asian ///
PCT_Hispanic__of_any_race_ PCT_Bachelor_s_degree_or_higher Average_household_size PCT_in_poverty ///
PCT_employed PCT_disabled PCT_with_health_coverage PCT_workers_using_public_transpo ///
Homeownership_rate Vacancy_rate PCT_with_a_broadband_internet_su gini PCT_Black_or_African_American ///
Perc_dining_out Rating log_age log_Reviews log_Total_population log_Median_age log_Median_household_income ///
log_Total_number_of_housing_unit log_Median_owner_occupied_housin log_Median_rent__housing_ ///
[aw = food_service_est_y], baselevels ///
absorb(county Multi_restaurant_bins, savefe) cluster(zip) first

* Overall Percent of food service establishments receiving loans
eststo: ivreghdfe Closed (FS_count_loans_P1P2_per_est = CB_Share_zip) PCT_male PCT_18_years_and_over_ PCT_Asian ///
PCT_Hispanic__of_any_race_ PCT_Bachelor_s_degree_or_higher Average_household_size PCT_in_poverty ///
PCT_employed PCT_disabled PCT_with_health_coverage PCT_workers_using_public_transpo ///
Homeownership_rate Vacancy_rate PCT_with_a_broadband_internet_su gini PCT_Black_or_African_American ///
Perc_dining_out Rating log_age log_Reviews log_Total_population log_Median_age log_Median_household_income ///
log_Total_number_of_housing_unit log_Median_owner_occupied_housin log_Median_rent__housing_ ///
[aw = food_service_est_y], baselevels ///
absorb(county Multi_restaurant_bins, savefe) cluster(zip) first

* Percent of number of loans received in Phase 1
eststo: ivreghdfe Closed (FS_count_PCT_P1 = CB_Share_zip) PCT_male PCT_18_years_and_over_ PCT_Asian ///
PCT_Hispanic__of_any_race_ PCT_Bachelor_s_degree_or_higher Average_household_size PCT_in_poverty ///
PCT_employed PCT_disabled PCT_with_health_coverage PCT_workers_using_public_transpo ///
Homeownership_rate Vacancy_rate PCT_with_a_broadband_internet_su gini PCT_Black_or_African_American ///
Perc_dining_out Rating log_age log_Reviews log_Total_population log_Median_age log_Median_household_income ///
log_Total_number_of_housing_unit log_Median_owner_occupied_housin log_Median_rent__housing_ ///
[aw = food_service_est_y], baselevels ///
absorb(county sizeFE, savefe) cluster(zip) first
